package com.car.shopping.client;


import com.car.commons.core.model.Result;
import com.car.shopping.client.model.order.GoodOrderInfoInsertDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Set;

@FeignClient(name = "car-order",path = "/order")
public interface CarOrderClient {
    /**
     * 退货后生成新的订单
     * @param dto
     * @return
     * @throws Exception
     */
    @PostMapping("/goodOrderInfo")
    public Result insert( @RequestBody GoodOrderInfoInsertDto dto) throws Exception;

    /**
     * 查之前的订单
     * @param id
     * @return
     */
    @GetMapping("/goodOrderInfo/{id}.ty")
    public Result findById(@PathVariable("id") String id);

    @GetMapping("/goodOrderInfo/tuikuan/{orderId}.ty")
    public Result tuikuan(@PathVariable("orderId") String orderId) throws Exception;

    @GetMapping("/goodOrderInfo/huanhuo.ty")
    Result huanhuo(@RequestParam("orderId") String orderId);
}
